<include file="../Public/header" />
<style type="text/css">
  #content > div{background-color: #f8f8f8;}
</style>
<div id="content" interface="favorite">
    <div id="user-weibo-list" data-title="{$datatitle}" date-selected="true" data-footer="none" data-rememberScroll="true">
        <header>
            <div id="header-buttons">
                <a href="javascript:history.go(-1);">
                    <div id="back" class="header-menu-link" data-back="false">
                    </div>
                </a>

                <div id="messageLink" class="header-menu-link"><a href="{:U('w3g/Index/msgbox')}"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
            </div>
            <h1 class="hasback">
                {$datatitle}
            </h1>
        </header>
    <!-- 个人信息 -->
    <div id="i_info">
        <div id="i_info_top">
                <div class="i_info_img"><img width="100%" src="{:APPS_URL}/w3g/_static/img/sys/profile_img.png"></div>
                <div id="i_info_top_ava">
                    <!-- 头像 -->
                    <img src="{$profile['avatar_big']}" width="70" height="70" >
                </div>
                <div id="i_info_top_box">
                    <div id="i_info_top_name">
                        <!-- 帐号昵称 -->
                        {$profile['uname']}
                    </div>
                    <div id="i_info_top_signature">
                        <php>if($profile['uid']==$_SESSION['mid']){</php>
                        <!--<div id="iitsb">
                            {$profile['intro']}
                        </div>-->
                        <php>}</php>
                        <!-- <div id="i_info_sendmsg" class="i_info_button">发私信</div> -->
                        <php>if($profile['uid'] == $mid) { </php>
                            <!-- <a href="{:U('w3g/Index/msgbox')}" class="pure-button pure-button-cc">消息盒子</a> -->
                            <a href="{:U('w3g/Setting/base')}" class="pure-button pure-button-cc">编辑资料</a>
                            <a href="#new-weibo" class="pure-button pure-button-cc">发分享</a>
                            <script>
                                TS.cache.isMyPage = true;
                            </script>
                        <php>}else{</php>
                            <eq name="sendmsg" value="1">
                            <div id="post-msg-to-uid" class="i_info_button i_info_msg pure-button pure-button-cc ts-listen" data-listen="weibo-tosendmsg" data-uname="{$profile['uname']}" data-uid="{$profile['uid']}">发私信</div>
                            </eq>
                            <php>if(!$profile['follow_state']['following']){</php>
                            <div id="i_info_follow" class="i_info_button pure-button pure-button-cc ts-listen" data-listen="weibo-follow-follow" data-follow="{:U('w3g/Index/doFollow',array('from'=>'weibo','type'=>'follow','user_id'=>$profile['uid']))}" data-unfollow="{:U('w3g/Index/doFollow',array('from'=>'weibo','type'=>'unfollow','user_id'=>$profile['uid']))}" linkto="{:U('w3g/Index/doFollow',array('from'=>'weibo','type'=>'follow','user_id'=>$profile['uid']))}">加关注</div>
                            <php>}else {</php>
                            <div id="i_info_follow" class="i_info_button i_info_followed pure-button pure-button-cc ts-listen" data-listen="weibo-follow-unfollow"  data-follow="{:U('w3g/Index/doFollow',array('from'=>'weibo','type'=>'follow','user_id'=>$profile['uid']))}" data-unfollow="{:U('w3g/Index/doFollow',array('from'=>'weibo','type'=>'unfollow','user_id'=>$profile['uid']))}" linkto="{:U('w3g/Index/doFollow',array('from'=>'weibo','type'=>'unfollow','user_id'=>$profile['uid']))}">取消关注</div>
                            <php>}</php>
                        <php>}</php>
                    </div>
                </div>
            </div>
    </div>
    <!-- 个人信息结束 -->
    <php>if($isAllowed == 0){</php>
        <div class="no_authority">-_-。sorry！根据对方隐私设置，您无权查看TA的主页</div>
    <php>}else{</php>
        <php>
            if($profile['uid'] != $mid){
                $iicb='i_info_counts_box';
            }else{
                $iicb='i_info_counts_box_i';
            }
        </php>
        <div id="i_info_counts" act="favorite">
                <php>if($profile['uid']!=$_SESSION['mid']){</php>
                    <div id="i_info_counts_box_weibo" class="{$iicb} highlight" onclick="javascript:window.open('{:U('w3g/Index/profile','uid='.$profile['uid'])}','_self')">
                        <div class="i_info_counts_title">详细</div>
                        <div class="i_info_counts_title">资料</div>
                    </div>
                <php>}</php>
                    <div id="i_info_counts_box_weibo" class="{$iicb}" onclick="javascript:window.open('{:U('w3g/Index/weibo','uid='.$profile['uid'])}','_self')">
                        <div class="i_info_counts_num">{$profile.count_info.feed_count}</div>
                        <div class="i_info_counts_title">分享</div>
                    </div>
                    <div id="i_info_counts_box_guanzhu" class="{$iicb}" uid="{$profile.uid}" onclick="javascript:window.open('{:U('w3g/Index/following','uid='.$profile['uid'])}','_self')">
                        <div class="i_info_counts_num">{$profile.count_info.following_count}</div>
                        <div class="i_info_counts_title">关注</div>
                    </div>
                    <div id="i_info_counts_box_fensi" class="{$iicb}" onclick="javascript:window.open('{:U('w3g/Index/followers','uid='.$profile['uid'])}','_self')">
                        <div class="i_info_counts_num">{$profile.count_info.follower_count}</div>
                        <div class="i_info_counts_title">粉丝</div>
                    </div>
                <php>if($profile['uid']==$_SESSION['mid']){</php>
                    <div id="i_info_counts_box_shoucang" class="{$iicb}" onclick="javascript:window.open('{:U('w3g/Index/favorite')}','_self')">
                        <div class="i_info_counts_num">{$profile.count_info.favorite_count}</div>
                        <div class="i_info_counts_title">收藏</div>
                    </div>
                <php>}</php>
        </div>

    <div>
        <h1 class="form-set-h1">基本信息</h1>
        <div class="form-set0">
            <dl>
                <dt>昵称</dt>
                <dd>{$profile.uname}</dd>
            </dl>
            <dl>
                <dt>性别</dt>
                <dd>{$profile.sex}<eq name="profile.sex" value="1">女</eq><eq name="profile.sex" value="2">男</eq></dd>
            </dl>
            <dl>
                <dt>地区</dt>
                <dd>{$profile.location}</dd>
            </dl>
            <dl class="noborder">
                <dt>简介</dt>
                <dd>{$profile.intro}</dd>
            </dl>
         </div>
    </div>
    <php>}</php>
    </div>

    <include file="../Public/footer" />